//-------------------------------------------------------------------
//	Copyright (c) 2010-2012 Zhirnov Andrey
//	This file is part of the "UXGEN" project.
//	See copyright notice in "Engine.h".
//-------------------------------------------------------------------

#ifndef _UX_OUTPUT_MESSAGES_H
#define _UX_OUTPUT_MESSAGES_H

#include "CLogger.h"

namespace Engine
{
namespace CoreSystems
{
	
	//
	// Output Log Messages
	//

	class _EXPORT_ COutputMessages : public ILogOutput, public CEngBaseObject
	{
	private:
		e_log_msg::type		_eWarningLevel,
							_eFlagFilter;

	public:
		COutputMessages();
		~COutputMessages();

		void			SetFilter(e_log_msg::type eFilter)	{ _eFlagFilter = eFilter | e_log_msg::_LWL_MASK; }
		e_log_msg::type	GetFilter() const					{ return _eFlagFilter; }

		void			SetLevel(uint uLevel)				{ _eWarningLevel = (uLevel << e_log_msg::_LWL_OFFSET) & e_log_msg::_LWL_MASK; }
		e_log_msg::type	GetLevel()	const					{ return _eWarningLevel; }


		// ILogOutput //
		virtual void Write(const char *pMsg, e_log_msg::type eType, const char *pSrcFile, uint uLine);
		virtual void NewLine();
		virtual void Free();

		// CEngBaseObject //
		virtual void Release();
	};

//-------------------------------------------------------------------

}	// CoreSystems
}	// Engine

#endif	// _UX_OUTPUT_MESSAGES_H